import service from '../utils/request'

export function selectByCondition (data) {
    return service({
        url: `/news/teacher`,
        method: 'post',
        data
    })
}

export function addNews (data) {
    return service({
        url: `/news`,
        method: 'post',
        data
    })
}

export function selectAll () {
    return service({
        url: `/news`,
        method: 'get'
    })
}

export function editNews (data) {
    return service({
        url: '/news',
        method: 'put',
        data
    })
}

export function deleteNews (params) {
    return service({
        url: `/news/${params}`,
        method: 'delete'
    })
}


export function selectByStudent (data) {
    return service({
        url: '/news/student',
        method: 'post',
        data
    })
}

